<%@page import="itsm.isperp.framework.core.context.ContextHolder"%>
<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
  String path = request.getContextPath();
  String basePath = ContextHolder.getWebServerName(request);
%>
<link rel="stylesheet" href="<%=path%>/css/mobile/weui.min.css" />
<script type="text/javascript" src="<%=path%>/js/libs/jweixin-1.1.0.js"></script>

<form action="<%=basePath%>api/wechat/incident/save" data-ajax="false"
	id="formid" >
	<div class="box" style="width:100%;">
	<div style="width:40%;margin:0 auto;">
		<div style="display: none">
			<input type="hidden" name="openid" value="${openid }" id="openid">
			<input type="hidden" name="id" value="${id }" id="id"> <input
				type="hidden" name="incidentType" value="故障">
		</div>


		<div class="weui-cell " style="">
			<div class="weui-cell__hd">
				<label class="weui-label"> <span
					style="color:red;font-size:11px;">*</span>手机号码 </label>
			</div>
			<div class="weui-cell__bd weui-cell_primary">
				<input id="mobile" name="mobile" value="${appUser.mobile }"
					data-valid="手机号码" class="weui-input formRequired" type="text"
					placeholder="请填写方便与你取得联系的手机号码">
			</div>
			<div class="weui-cell_ft" style="display: none">
				<i class="weui_icon_warn"></i>
			</div>
		</div>

		<!-- <div class="weui-cells" style="margin-top:0px;">
			<div class="weui-cell weui-cell_select weui-cell_select-after">
				<div class="weui-cell__hd">
					<label for="" class="weui-label">生日（月）</label>
				</div>
				<div class="weui-cell__bd">
					<select id="idYear" style="display:none" name="idYear" data=""
						data-allow-empty="false" data-width="40px"></select> 
						<select class="weui-select" id="idMonth" name="birthdayMonth">

					</select>
				</div>
			</div>
			<div class="weui-cell weui-cell_select weui-cell_select-after">
				<div class="weui-cell__hd">
					<label for="" class="weui-label">生日（日）</label>
				</div>
				<div class="weui-cell__bd">
					<select class="weui-select" id="idDay" name="birthdayDay">

					</select>
				</div>
			</div>
		</div> -->

		<%-- <div class="weui-cell ">
				<div class="weui-cell__hd">
					<label class="weui-label">
					电话号码 </label>
				</div>
				<div class="weui-cell__bd weui-cell_primary formRequired">
					<input id="tel" name="tel" value="${appUser.tel }" 
						email"" class="weui-input" type="text"
						placeholder="请填写电话号码">
				</div>
				<div class="weui-cell_ft" style="display: none">
					<i class="weui_icon_warn"></i>
				</div>
		</div> --%>

		<div class="weui-cell ">
			<div class="weui-cell__hd">
				<label class="weui-label"> Email</label>
			</div>
			<div class="weui-cell__bd weui-cell_primary ">
				<input id="Email" name="Email" value="${appUser.email }"
					email"" class="weui-input" type="text" placeholder="请输入邮箱地址">
			</div>
			<div class="weui-cell_ft" style="display: none">
				<i class="weui_icon_warn"></i>
			</div>
		</div>

		<div class="weui-cell ">
			<div class="weui-cell__hd">
				<label class="weui-label"> <span
					style="color:red;font-size:11px;">*</span>标题</label>
			</div>
			<div class="weui-cell__bd weui-cell_primary">
				<input id="title" name="title" class="weui-input formRequired"
					data-valid="标题" type="text" placeholder="请输入事件标题">
			</div>
			<div class="weui-cell_ft" style="display: none">
				<i class="weui_icon_warn"></i>
			</div>
		</div>


		<div class="weui-cells__title" style="font-size:16px;"></div>
		<div class="weui-cells weui-cells_form" style="margin-top:0px;">
			<div class="weui-cell">
				<div class="weui-cell__bd">
					<textarea class="weui-textarea" placeholder="请输入事件详细描述" rows="3"
						name="description" id="description"></textarea>
					<!-- <div class="weui-textarea-counter">
						<span>0</span>/200
					</div> -->
				</div>
			</div>
		</div>
		<div class="weui-cells__title" style="font-size:16px;"></div>
		<div class="weui-cells weui-cells_form">
			<div class="weui-cell">
				<div class="weui-cell__bd ">
					<div class="weui-uploader">
						<div class="weui-uploader__hd weui-cell" style="padding:0px;">
							<div class="weui-cell__bd weui-cell_primary">图片上传</div>
							<div class="weui-cell_ft js_counter">0/3</div>
						</div>
						<div class="weui-uploader__bd">
							<ul class="weui-uploader__files">
								<!-- 预览图插入到这 -->
							</ul>
							<div class="weui-uploader__input-box">
								<input id="js_file" class="weui-uploader__input js_file"
									type="file" accept="image/jpg,image/jpeg,image/png,image/gif"
									multiple="">
							</div>
						</div>
					</div>
					<div class="bd">
						<div class="weui-msg__desc">温馨提示：建议在wifi环境下上传图片，或者适当控制图片大小。部分安卓系统暂时不支持图片上传。</div>
					</div>
				</div>
			</div>
		</div>
		<a class="weui-btn weui-btn_primary" onclick="return takeSubmit();">
			提交 </a>
	</div>
	</div>
	</div>
</form>
<script type="text/javascript">
var ua = navigator.userAgent;
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/),
    isIphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),
    isAndroid = ua.match(/(Android)\s+([\d.]+)/),
    isMobile = isIphone || isAndroid;
    if(isMobile) {
        alert("手机");
    }else{
        alert("电脑");
    }
</script>




